package org.jeecg.modules.flowable.apithird.service.impl;

import cn.hutool.core.bean.BeanUtil;
import org.apache.shiro.SecurityUtils;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.flowable.apithird.entity.SysCategory;
import org.jeecg.modules.flowable.apithird.entity.SysRole;
import org.jeecg.modules.flowable.apithird.entity.SysUser;
import org.jeecg.modules.flowable.apithird.service.IFlowThirdService;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 业务层需实现的接口定义<br/>
 *  支撑工作流模块与业务的关联
 *
 *  Todo 飞龙 此模块需要修改
 * @author pmc
 */
@Service
public class IFlowThirdServiceImpl  implements IFlowThirdService {



    /**
     * 获取当前登录用户
     *
     * @return 当前登录用户信息
     */
    @Override
    public SysUser getLoginUser() {
        SysUser sysUser = new SysUser();
        LoginUser loginUser  = (LoginUser) SecurityUtils.getSubject().
                   getPrincipal();
        BeanUtil.copyProperties(sysUser,loginUser);
        return sysUser;
    }


    /**
     * 所有用户
     * @return
     */
    @Override
    public List<SysUser> getAllUser() {
        return null;
    }


    /**
     * 通过角色id获取用户
     * @return
     */
    @Override
    public List<SysUser> getUsersByRoleId(String roleId) {
        return null;
    }


    /**
     * 根据用户username查询用户信息
     * @param username
     * @return
     */
    @Override
    public SysUser getUserByUsername(String username) {
        return null;
    }


    /**
     * 获取所有角色
     * @return
     */
    @Override
    public List<SysRole> getAllRole() {
        return null;
    }

    /**
     * 获取所有流程分类
     * @return
     */
    @Override
    public List<SysCategory> getAllCategory() {
        return null;
    }


    /**
     * 通过用户账号查询部门 name
     * @param username
     * @return 部门 name
     */
    @Override
    public List<String> getDepartNamesByUsername(String username) {
        return null;
    }
}
